.class public Lcom/estrongs/android/ui/dialog/e0;
.super Ljava/lang/Object;
.source "NewAdbServerDialog.java"


# instance fields
.field private a:Lcom/estrongs/android/ui/dialog/q;

.field private b:Landroid/view/View;

.field private c:Landroid/content/Context;

.field private d:Landroid/widget/EditText;

.field private e:Landroid/widget/EditText;

.field private f:Landroid/widget/EditText;

.field private g:Z

.field private h:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    .line 3
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->e:Landroid/widget/EditText;

    .line 4
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    const/4 v0, 0x0

    .line 5
    iput-boolean v0, p0, Lcom/estrongs/android/ui/dialog/e0;->g:Z

    .line 6
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    .line 7
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->d()V

    .line 8
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->b()V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .locals 1

    .line 9
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 10
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    .line 11
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->e:Landroid/widget/EditText;

    .line 12
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    const/4 v0, 0x0

    .line 13
    iput-boolean v0, p0, Lcom/estrongs/android/ui/dialog/e0;->g:Z

    .line 14
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    .line 15
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->d()V

    .line 16
    invoke-direct {p0, p2, p3}, Lcom/estrongs/android/ui/dialog/e0;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 17
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->b()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/e0;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->e()V

    return-void
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;)V
    .locals 4

    .line 4
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->h:Ljava/lang/String;

    if-eqz p1, :cond_2

    if-eqz p1, :cond_2

    const/4 v0, 0x1

    .line 5
    iput-boolean v0, p0, Lcom/estrongs/android/ui/dialog/e0;->g:Z

    .line 6
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->I(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    const-string v1, ":"

    .line 7
    invoke-virtual {p1, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    .line 8
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    const/4 v2, 0x0

    aget-object v3, p1, v2

    invoke-virtual {v1, v3}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 9
    array-length v1, p1

    if-le v1, v0, :cond_0

    .line 10
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/e0;->e:Landroid/widget/EditText;

    aget-object p1, p1, v0

    invoke-virtual {v1, p1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    :cond_0
    if-eqz p2, :cond_1

    .line 11
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result p1

    if-lez p1, :cond_1

    .line 12
    iget-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    invoke-virtual {p1, p2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 13
    :cond_1
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p1

    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/e0;->h:Ljava/lang/String;

    invoke-virtual {p1, p2}, Lcom/estrongs/android/pop/l;->r(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/CharSequence;)Z

    move-result p1

    if-eqz p1, :cond_2

    .line 14
    iget-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    const p2, 0x7f060204

    invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getColor(I)I

    move-result p1

    .line 15
    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    invoke-virtual {p2, p1}, Landroid/widget/EditText;->setTextColor(I)V

    .line 16
    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    invoke-virtual {p2, v2}, Landroid/widget/EditText;->setEnabled(Z)V

    .line 17
    iget-object p2, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    invoke-virtual {p2, p1}, Landroid/widget/EditText;->setTextColor(I)V

    .line 18
    iget-object p1, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    invoke-virtual {p1, v2}, Landroid/widget/EditText;->setEnabled(Z)V

    :cond_2
    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/e0;Ljava/lang/String;)Z
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/dialog/e0;->a(Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method private a(Ljava/lang/String;)Z
    .locals 2

    .line 19
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->V1(Ljava/lang/String;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_0

    return v1

    .line 20
    :cond_0
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->w0(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 21
    :try_start_0
    invoke-static {p1}, Lcom/estrongs/fs/impl/adb/c;->n(Ljava/lang/String;)Z

    move-result p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return p1

    :catch_0
    move-exception p1

    .line 22
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :cond_1
    return v1
.end method

.method static synthetic b(Lcom/estrongs/android/ui/dialog/e0;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    return-object p0
.end method

.method private b()V
    .locals 3

    .line 2
    new-instance v0, Lcom/estrongs/android/ui/dialog/q$n;

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    invoke-direct {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/e0;->b:Landroid/view/View;

    .line 3
    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(Landroid/view/View;)Lcom/estrongs/android/ui/dialog/q$n;

    new-instance v1, Lcom/estrongs/android/ui/dialog/e0$b;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/e0$b;-><init>(Lcom/estrongs/android/ui/dialog/e0;)V

    const v2, 0x7f11029e

    .line 4
    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    new-instance v1, Lcom/estrongs/android/ui/dialog/e0$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/e0$a;-><init>(Lcom/estrongs/android/ui/dialog/e0;)V

    const v2, 0x7f110299

    .line 5
    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    const v1, 0x7f110706

    .line 6
    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(I)Lcom/estrongs/android/ui/dialog/q$n;

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q$n;->a()Lcom/estrongs/android/ui/dialog/q;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->a:Lcom/estrongs/android/ui/dialog/q;

    return-void
.end method

.method static synthetic c(Lcom/estrongs/android/ui/dialog/e0;)Landroid/widget/EditText;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    return-object p0
.end method

.method private c()Ljava/lang/String;
    .locals 5

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    :goto_0
    const-string v1, "/"

    .line 3
    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    const/4 v3, 0x1

    if-nez v2, :cond_3

    const-string v2, "\\"

    invoke-virtual {v0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_0

    goto :goto_1

    .line 4
    :cond_0
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    if-nez v2, :cond_1

    const/4 v0, 0x0

    return-object v0

    .line 5
    :cond_1
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "adb://"

    invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 6
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    sub-int/2addr v2, v3

    invoke-virtual {v0, v2}, Ljava/lang/String;->charAt(I)C

    move-result v2

    const/16 v3, 0x2f

    if-eq v2, v3, :cond_2

    .line 7
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 8
    :cond_2
    new-instance v1, Ljava/lang/StringBuffer;

    invoke-direct {v1, v0}, Ljava/lang/StringBuffer;-><init>(Ljava/lang/String;)V

    .line 9
    invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0

    .line 10
    :cond_3
    :goto_1
    invoke-virtual {v0, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private d()V
    .locals 3

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c0293

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->b:Landroid/view/View;

    const v1, 0x7f090725

    .line 3
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->b:Landroid/view/View;

    const v1, 0x7f09090e

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->e:Landroid/widget/EditText;

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->b:Landroid/view/View;

    const v1, 0x7f090325

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->f:Landroid/widget/EditText;

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->d:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->requestFocus()Z

    return-void
.end method

.method static synthetic d(Lcom/estrongs/android/ui/dialog/e0;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/estrongs/android/ui/dialog/e0;->g:Z

    return p0
.end method

.method static synthetic e(Lcom/estrongs/android/ui/dialog/e0;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/e0;->h:Ljava/lang/String;

    return-object p0
.end method

.method private e()V
    .locals 4

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/e0;->c()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_0

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    .line 4
    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f1106fb

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    .line 5
    invoke-static {v0, v1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    return-void

    .line 6
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/e0;->c:Landroid/content/Context;

    const v2, 0x7f11008e

    const v3, 0x7f11008d

    invoke-static {v1, v2, v3}, Les/dj;->a(Landroid/content/Context;II)V

    .line 7
    new-instance v1, Ljava/lang/Thread;

    new-instance v2, Lcom/estrongs/android/ui/dialog/e0$c;

    invoke-direct {v2, p0, v0}, Lcom/estrongs/android/ui/dialog/e0$c;-><init>(Lcom/estrongs/android/ui/dialog/e0;Ljava/lang/String;)V

    invoke-direct {v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    .line 8
    invoke-virtual {v1}, Ljava/lang/Thread;->start()V

    return-void
.end method

.method static synthetic f(Lcom/estrongs/android/ui/dialog/e0;)Lcom/estrongs/android/ui/dialog/q;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/e0;->a:Lcom/estrongs/android/ui/dialog/q;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/e0;->a:Lcom/estrongs/android/ui/dialog/q;

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void
.end method
